* {
    box-sizing: border-box;
}

body {
    background-color: #eafbff;
    background-image: linear-gradient(to bottom,
            #eafbff 0%,
            #eafbff 50%,
            #5290f9 50%,
            #5290f9 100%);
    font-family: 'Muli', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

nav {
    background-color: #fff;
    padding: 20px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow-x: hidden;
    transition: width 0.6s linear;
    -webkit-transition: width 0.6s linear;
    -moz-transition: width 0.6s linear;
    -ms-transition: width 0.6s linear;
    -o-transition: width 0.6s linear;
}


nav.active {
    width: 350px;
}

nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 0;
    transition: width 0.6s ease;
    -webkit-transition: width 0.6s ease;
    -moz-transition: width 0.6s ease;
    -ms-transition: width 0.6s ease;
    -o-transition: width 0.6s ease;
}

nav.active ul {
    width: 100%;
}

nav ul li {
    transform: rotateY(0deg);
    opacity: 0;
    transition: all 0.6s linear;
    -webkit-transition: all 0.6s linear;
    -moz-transition: all 0.6s linear;
    -ms-transition: all 0.6s linear;
    -o-transition: all 0.6s linear;
}

nav.active ul li {
    opacity: 1;
    transform: rotateY(360deg);
    -webkit-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    -ms-transform: rotateY(360deg);
    -o-transform: rotateY(360deg);
}

nav ul a {
    position: relative;
    color: #000;
    text-decoration: none;
    margin: 0 10px;
}


.icon {
    background-color: #fff;
    border: 0;
    cursor: pointer;
    padding: 0;
    position: relative;
    height: 30px;
    width: 30px;
}

.icon .line {
    height: 2px;
    width: 20px;
    background-color: #5290f9;
    position: absolute;
    top: 15px;
    left: 10px;
    transition: transform 0.6s linear;
    -webkit-transition: transform 0.6s linear;
    -moz-transition: transform 0.6s linear;
    -ms-transition: transform 0.6s linear;
    -o-transition: transform 0.6s linear;
}

.icon .line1 {
    transform: rotate(360deg) translateY(5px) translateX(-4px);
    -webkit-transform: rotate(360deg) translateY(5px) translateX(-4px);
    -moz-transform: rotate(360deg) translateY(5px) translateX(-4px);
    -ms-transform: rotate(360deg) translateY(5px) translateX(-4px);
    -o-transform: rotate(360deg) translateY(5px) translateX(-4px);
}

.icon .line2 {
    transform: rotate(-360deg) translateY(-5px) translateX(-4px);
    -webkit-transform: rotate(-360deg) translateY(-5px) translateX(-4px);
    -moz-transform: rotate(-360deg) translateY(-5px) translateX(-4px);
    -ms-transform: rotate(-360deg) translateY(-5px) translateX(-4px);
    -o-transform: rotate(-360deg) translateY(-5px) translateX(-4px);
}

nav.active .icon .line1 {
    transform: rotate(45deg) ;
    -webkit-transform: rotate(45deg) ;
    -moz-transform: rotate(45deg) ;
    -ms-transform: rotate(45deg) ;
    -o-transform: rotate(45deg) ;
}

nav.active .icon .line2 {
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    -moz-transform: rotate(135deg);
    -ms-transform: rotate(135deg);
    -o-transform: rotate(135deg);
}